package io.jft.doll.api

import com.g.base.api.BaseResult
import com.google.gson.JsonObject
import io.jft.doll.room.entity.common.AddressItemCEntity
import io.jft.doll.room.entity.common.AddressRegionCEntity
import io.reactivex.Observable
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

/**
 * Created by G on 2017/11/16 0016.
 */
interface AddressApi {
    @GET("address/getList")
    fun getAllAddress(): Observable<BaseResult<List<AddressItemCEntity>>>

    @POST("address/saveAddress")
    fun upDateAddress(@Body jsonObject: JsonObject): Observable<BaseResult<Any?>>

    @POST("address/addAddress")
    fun insertAddress(@Body jsonObject: JsonObject): Observable<BaseResult<Any?>>

    @POST("address/delAddress/{id}")
    fun deleteAddress(@Path("id") id: String): Observable<BaseResult<Any?>>

    @POST("address/getArea")
    fun getRegion(@Body jsonObject: JsonObject): Observable<BaseResult<List<AddressRegionCEntity>>>
}